<?php
// +--------------------------------------------------------------------------
// | ZAIYOUDAO [ 载攸道 先顺得常 ] <http://www.zaiyoudao.com>
// +--------------------------------------------------------------------------
// | Copyright © 2009-2016 载攸道 版权所有 <TEL:17090888854>
// +--------------------------------------------------------------------------
// | Project: YiPHP [ 我会的仅仅是偷懒！ ] <http://www.yiphp.com>
// +--------------------------------------------------------------------------
// | Author: 牛很多戒很多不戒 <n@isdce.com> <http://juexue.wang>
// +--------------------------------------------------------------------------

/**
 * KODExplorer授权登录
 */
namespace Addon\KODExplorer\Controller;
use Addon\KODExplorer\Controller\CommonController;

/**
 * KODExplorer文件管理插件
 */
class AuthController extends CommonController {
    
	/**
	 * KODExplorer授权登录 TODO更安全的验证方式
	 */
	public function Login(){
		
		action_log('addon_kodexplorer_auth_login'); 
		
		//只有开发者才能进行登录
		if(getUID()==1){
			
			$url = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/plugin/KODExplorer/index.php?user/loginSubmit&name=admin&check_code=undefined&password=123123qqq&rember_password=1';
			 
			redirect($url,0,'');
			
		}else{
			
			echo 'no way';
		}

	}
	
}